package com.moore.service.Impl;

import com.moore.bean.Permissions;
import com.moore.dto.ResponseData;
import com.moore.mapper.PermissionMapper;
import com.moore.service.PermissionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

import static com.moore.utils.Logger.toLog;

@Service
public class PermissionServiceImpl implements PermissionService {
    @Autowired
    PermissionMapper permissionMapper;
    @Override
    public ResponseData getAllPermissions() {
        toLog("获取所有权限成功");
        List<Permissions> permissions = permissionMapper.getAllPermissions();
        return new ResponseData(200,"获取成功",permissions,0);
    }
}
